package cn.itsource.ymcc.web.controller;

import cn.itsource.ymcc.service.ICourseService;
import cn.itsource.ymcc.doc.CourseDoc;
import cn.itsource.ymcc.result.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SerachController {

    @Autowired
    private ICourseService courseServce;

    @RequestMapping(value = "/course/online",method = RequestMethod.POST)
    public JSONResult online(@RequestBody CourseDoc courseDoc){
        courseServce.online(courseDoc);
        //返回成功
        return JSONResult.success();
    }
}
